/**
 * 
 */
package com.lehecai.core.lottery;

import java.util.ArrayList;
import java.util.List;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import com.lehecai.core.IntegerBeanLabelItem;

/**
 * @author qatang
 * 银行到帐方式
 */
public class BankBusinessType extends IntegerBeanLabelItem {

	private static final long serialVersionUID = 4838484908433972583L;

	private static final Logger logger = LoggerFactory.getLogger(BankBusinessType.class.getName());
	
	private static List<BankBusinessType> items = new ArrayList<BankBusinessType>();
	
	protected BankBusinessType(String name, int value) {
		super(BankBusinessType.class.getName(), name, value);
		items.add(this);
	}
	
	public static BankBusinessType getItem(int value){
		try {
			return (BankBusinessType)BankBusinessType.getResult(BankBusinessType.class.getName(), value);
		} catch (Exception e) {
			logger.error(e.getMessage(), e);
			return null;
		}
	}
	
	public static List<BankBusinessType> getItems() {
		return items;
	}
	
	public static final BankBusinessType ALL = new BankBusinessType("全部", -1);
	public static final BankBusinessType DEFAULT = new BankBusinessType("默认", 0);
	public static final BankBusinessType T0 = new BankBusinessType("当天到账", 1);
	public static final BankBusinessType T1 = new BankBusinessType("隔天到账", 2);
}
